#include <oci.h>
#include <stdio.h>
#include <string.h>


int main() {
int i  = 0;
OCIEnv     *myenvhp;    /* the environment handle */
OCIServer  *mysrvhp;    /* the server handle */
OCIError   *myerrhp;    /* the error handle */
OCISession *myusrhp;    /* user session handle */
OCISvcCtx  *mysvchp;    /* the  service handle */
printf("Hello\n");
/* initialize the mode to be the threaded and object environment */
(void) OCIEnvCreate(&myenvhp, OCI_OBJECT, (void  *)0,
                    0, 0, 0, (size_t) 0, (void  **)0);

printf("%d\n",i++);

/* allocate a server handle */
(void) OCIHandleAlloc ((void  *)myenvhp, (void  **)&mysrvhp,
      OCI_HTYPE_SERVER, 0, (void  **) 0);
printf("%d\n",i++);
/* allocate an error handle */
(void) OCIHandleAlloc ((void  *)myenvhp, (void  **)&myerrhp,
      OCI_HTYPE_ERROR, 0, (void  **) 0);
printf("%d\n",i++);
      /* create a server context */
(void) OCIServerAttach (mysrvhp, myerrhp, (text *)"dbdwex.world",
      strlen ("dbdwex.world"), OCI_DEFAULT);
printf("%d\n",i++);
     /* allocate a service handle */
(void) OCIHandleAlloc ((void  *)myenvhp, (void  **)&mysvchp,
      OCI_HTYPE_SVCCTX, 0, (void  **) 0);
printf("%d\n",i++);
 /* set the server attribute in the service context handle*/
(void) OCIAttrSet ((void  *)mysvchp, OCI_HTYPE_SVCCTX,
       (void  *)mysrvhp, (ub4) 0, OCI_ATTR_SERVER, myerrhp);
printf("%d\n",i++);
      /* allocate a user session handle */
(void) OCIHandleAlloc ((void  *)myenvhp, (void  **)&myusrhp,
     OCI_HTYPE_SESSION, 0, (void  **) 0);
printf("%d\n",i++);
      /* set user name attribute in user session handle */
 (void) OCIAttrSet ((void  *)myusrhp, OCI_HTYPE_SESSION,
      (void  *)"dna", (ub4)strlen("dna"),
      OCI_ATTR_USERNAME, myerrhp);
printf("%d\n",i++);
      /* set password attribute in user session handle */
 (void) OCIAttrSet ((void  *)myusrhp, OCI_HTYPE_SESSION,
      (void  *)"dna", (ub4)strlen("dna"),
      OCI_ATTR_PASSWORD, myerrhp);
printf("%d\n",i++);
 (void) OCISessionBegin ((void  *) mysvchp, myerrhp, myusrhp,
      OCI_CRED_RDBMS, OCI_DEFAULT);
printf("%d\n",i++);
    /* set the user session attribute in the service context handle*/
 (void) OCIAttrSet ((void  *)mysvchp, OCI_HTYPE_SVCCTX,
       (void  *)myusrhp, (ub4) 0, OCI_ATTR_SESSION, myerrhp);
printf("%d\n",i++);








  printf("Hello\n");
  return 0;
}
